package se.webbzon.boltzmann.battle.strategy.playerstrategy;

import java.awt.Color;
import java.awt.Image;

public class PSIconPageLink extends AbstractPSLinkIcon {
	
	// The description of this player strategy link icon
	private final String description;
	
	/*============================================================
	Constructors
	============================================================*/
	
	public PSIconPageLink(	PSIconPage iconPage,
							Image image,
							String text, String description) {
		super(iconPage,image,text);
		this.description = description;
	}

	public PSIconPageLink(	PSIconPage iconPage,
							Image image,
							String text, String description, 
							Color color) {
		super(iconPage,image,text, color);
		this.description = description;
	}
	
	/*============================================================
	Public Methods
	============================================================*/

	@Override public boolean isAvailable() {
		PSIconPage iconPage = (PSIconPage) getPage();
		return iconPage.icons() > 0;
	}

	@Override public String getUnavailableMessage() {
		return "The selected strategy is unavailable.";
	}
	
	@Override public void onSelect(PlayerStrategyHud psh, AbstractPSPage page) {
		
	}

	@Override public String getDescription() {
		return description;
	}

	

}
